#pragma once

template <class T, typename ReturnType, typename Param1>
class Functor
{
private:
  ReturnType (T::*mFunction)(Param1);   
  T* pt2Object;                  

public:
  Functor(T* _pt2Object, void(T::*func)(Param1))
  {
    pt2Object = _pt2Object;
    mFunction = func;
  };

  ReturnType operator()(Param1 p1)
  {
    return (*pt2Object.*mFunction)(p1);
  };
};